#ifndef QxWellFileBase_HPP
#define QxWellFileBase_HPP

#include <QObject>
#include "QxWellDataIO.hpp"

#include <QMap>
#include <QFile>

class QxWellFileBase : public QObject, public  QxWellDataIO
{
  Q_OBJECT

public:

  QxWellFileBase( QObject* parent=0 );
  virtual ~QxWellFileBase();

  QxWellInfoDefine wellInfoDefine() const;
  void setWellInfoDefine( const QxWellInfoDefine& );

  QVector<QxWellLogDefine> wellLogDefines() const;
  bool insertWellLogDefine( const QxWellLogDefine& );
  bool removeWellLogDefine( const QxWellLogDefine& );

  /// this method will lead file handle to read wellLog data & update wellLogDefine
  virtual bool prepare()=0;

  virtual QStringList queryWellLogNames();

  virtual void clear();

  const QString& filename() const;
  void setFilename( const QString& );

protected:

  virtual void reload()=0;

private:

  QString                  m_filename;
  QxWellInfoDefine         m_wellInfoDefine;
  QVector<QxWellLogDefine> m_wellLogDefines;
};

#endif // QxWellFileBase_HPP